package com.elock.service.serviceImpl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.elock.base.core.Page;
import com.elock.base.core.Pageable;
import com.elock.base.core.service.impl.BaseServiceImpl;
import com.elock.dao.TerminalRealtimePositionDao;
import com.elock.entity.TerminalRealtimePosition;
import com.elock.service.TerminalRealtimePositionService;

/**
 * 终端实时位置信息
 * @author 仁德
 */
@Service("terminalRealtimePositionServiceImpl")
public class TerminalRealtimePositionServiceImpl
		extends BaseServiceImpl<TerminalRealtimePosition>
		implements TerminalRealtimePositionService {

	@Resource(name = "terminalRealtimePositionDao")
	private TerminalRealtimePositionDao terminalRealtimePositionDao;

	@Override
	@Transactional(readOnly = true)
	public Page<Map<String, Object>> findPage(String ids, Pageable pageable) {
		return terminalRealtimePositionDao.findPage(ids, pageable);
	}

	@Override
	@Transactional(readOnly = true)
	public List<Map<String, Object>> findList(String ids, Date terminalDate) {
		return terminalRealtimePositionDao.findList(ids, terminalDate);
	}

	@Override
	@Transactional(readOnly = true)
	public List<Map<String, Object>> findPointsList(String terminalNum, String startTime,
			String endTime) {
		return terminalRealtimePositionDao.findPointsList(terminalNum,
				startTime,
				endTime);
	}
}
